package com.scy.boot06test01.mapper;

import com.scy.boot06test01.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {


    @Select("select password from userinfo where username=#{username}")
    User selectByUsername(String username);

    @Insert("insert into userinfo values(null,#{username},#{password},#{nickname},#{age})")
    void insert(User user);

}
